﻿using System;
using System.Collections.Generic;

namespace _98_初始化字典集合的方法_集合
{
    class Program
    {
        static void Main(string[] args)
        {
            Dictionary<string, string> dic1 = new Dictionary<string, string>();
            dic1["k1"] = "val_1";
            dic1["k2"] = "val_2";
            dic1["k3"] = "val_3";

            Dictionary<int, long> dic2 = new Dictionary<int, long>();
            dic2.Add(1, 15600000);
            dic2.Add(2, 15700000);
            dic2.Add(3, 15900000);

            Dictionary<decimal, DateTime> dic3 = new Dictionary<decimal, DateTime>()
            {
                [12M] = new DateTime(2017, 9, 1),
                [13M] = new DateTime(2018, 10, 1),
                [14M] = new DateTime(2018, 12, 20)
            };

            foreach (var item in dic1)
            {
                Console.WriteLine(item);

            }

    }
    }
}
